import pandas as pd

df = pd.DataFrame({
    'Name':['Alice','Bob','Charlie'],
    'Age':[20,30,35],
    'City':['New York','Log Angeles','Chicago']

})

# 将DataFrame 写入Excel文件，写入‘Sheet1’ 表单
df.to_excel('output.xlsx',sheet_name='Sheet1',index=False)